package com.yjzx.util.binlog.core.entiry;

import com.github.shyiko.mysql.binlog.event.EventType;
import lombok.Getter;

/**
 * @author yjzx
 * @description BinLogAlter
 * @since 2025/6/20
 */
@Getter
public class BinLogDdl extends BinLog {

    /**
     * sql
     */
    private final String sql;

    public BinLogDdl(String database, String table, EventType eventType, long timestamp, long serverId, String sql) {
        super(database, table, eventType, timestamp, serverId);
        this.sql = sql;
    }

    @Override
    public String toString() {
        return "BinLogAlter{" +
                "database='" + database + '\'' +
                ", table='" + table + '\'' +
                ", eventType=" + eventType +
                ", timestamp=" + timestamp +
                ", serverId=" + serverId +
                ", sql='" + sql + '\'' +
                '}';
    }
}
